﻿using ScFramework.Core;

using UnityEngine;
using UnityEngine.SceneManagement;

public class CameraManager:SystemModule
{
    private Camera camera = null;

    private Vector2 siz;
    public Vector2 ViewSiz
    {
        get
        {
            return siz;
        }
    }
    public Vector2 CameraPos
    {
        get
        {
            return camera.transform.position;
        }
    }
    public override void Initialize(Main m)
    {
        base.Initialize(m);
        camera = GameObject.FindObjectOfType<Camera>();
        siz = camera.ScreenToWorldPoint(new Vector3(camera.pixelWidth, camera.pixelHeight)) - camera.ScreenToWorldPoint(Vector3.zero);
        Debug.Log(siz);
    }
    public override void Update(float deltaTime)
    {
        base.Update(deltaTime);
     //   Debug.Log(Input.mousePosition);
    }
    
}